import request from "@/utils/request";

// 获取新闻列表
export function newsList(data) {
  return request({
    url: "/cargo/news/page",
    method: "post",
    data,
  });
}

// 删除新闻列表
export function deleteNews(query) {
  return request({
    url: "/cargo/news/remove",
    method: "get",
    params: query,
  });
}

// 获取新闻详情
export function newsDetail(query) {
  return request({
    url: "/cargo/news/detail",
    method: "get",
    params: query,
  });
}

// 新增新闻
export function newsAdd(data) {
  return request({
    url: "/cargo/news/add",
    method: "post",
    data,
  });
}

// 更新新闻
export function newsUpdate(data) {
  return request({
    url: "/cargo/news/update",
    method: "post",
    data,
  });
}

// 获取公司简介
export function getCompanyInfo(query) {
  return request({
    url: "/cargo/companyInfo/detail",
    method: "get",
    params: query,
  });
}

// 修改公司简介
export function updateCompanyInfo(data) {
  return request({
    url: "/cargo/companyInfo/update",
    method: "post",
    data,
  });
}
